package store.lunangangster.engine.impl.calendar;

import java.util.Date;
import store.lunangangster.engine.impl.Context;

public class CycleCalendar implements BusinessCalendar {

  public static final String name = "cycle";

  @Override
  public String getName() {
    return name;
  }

  @Override
  public Date resolveDateString(String dateString) {
    DurationParser durationParser = new DurationParser(dateString,
        Context.getProcessEngineConfiguration().getEngineClock());

    return durationParser.getNextDate();
  }
}
